# This Python file uses the following encoding: utf-8
with open("测试.html", "r", encoding="utf-8") as f, open("cs.html", "ab+") as f2:
    file = f.read()
    print(file)
    print(file.encode())
    file_bin = file.encode()
    f2.write(bytes(file_bin))
    f2.seek(-5, 2)
    n = f2.read(1)
    print(bin(int(n.hex(),16)))
    f2.write(bytes(bin(int(n.hex(),16))))